<template>
<div>
  <span v-for="(item,index) in list" :key="index" :class="item.isTrue"> {{index+1}} : {{text(item.isTrue)}}</span>
  </div>
</template>

<script>
export default {
  props:['list'],
  methods:{
    text(isTrue){
      if(isTrue=='right'){
        return '正确'
      }else if(isTrue=='error'){
        return '错误'
      }else{
        return '未完成'
      }
    }
  }
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>